package kingone.phone_store_spring_practice.entity;

import lombok.Data;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.Objects;

@Data
@Entity
//@Table(name = "order_master", schema = "phone_store_demo", catalog = "")
public class OrderMaster {
    @Id
    /*此处不设置自增型，订单号可由后续获得；此外，订单号为String类型，不为int的原因是：
    * 订单号通常会很长，不宜用int进行存储*/
    private String orderId;

    private String buyerName;
    private String buyerPhone;
    private String buyerAddress;
    private Integer phoneId;
    private String phoneName;
    private Integer phoneQuantity;
    private String phoneIcon;
    private Integer specsId;
    private String specsName;
    private BigDecimal specsPrice;
    private BigDecimal orderAmount;
    private Integer payStatus;
    private Timestamp createTime;
    private Timestamp updateTime;

}
